<section *ngFor="let field of assessment.form?.fields; let n = index">
    @if (n < assessment.form?.dimenssionscount) {
        <ion-card>
            <ion-item class="ion-text-wrap">
                <ion-label>
                    <h2 [core-mark-required]="edit">{{ field.dimtitle }}</h2>
                    <core-format-text [text]="field.description" contextLevel="module" [contextInstanceId]="moduleId"
                        [courseId]="courseId" />
                </ion-label>
                @if (edit && fieldErrors['chosenlevelid_' + n]) {
                    <core-input-errors [errorText]="fieldErrors['chosenlevelid_' + n]" />
                }
            </ion-item>
            <ion-list>
                <ion-radio-group [(ngModel)]="selectedValues[n].chosenlevelid" [name]="'chosenlevelid_' + n">
                    <ion-item *ngFor="let subfield of field.fields">
                        <ion-radio [value]="subfield.levelid" [disabled]="!edit" labelPlacement="end" justify="start">
                            <p>
                                <core-format-text [text]="subfield.definition" contextLevel="module" [contextInstanceId]="moduleId"
                                    [courseId]="courseId" />
                            </p>
                        </ion-radio>
                    </ion-item>
                </ion-radio-group>
            </ion-list>
        </ion-card>
    }
</section>
